package com.ruoyi.project.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.SysHouseDecorationMapper;
import com.ruoyi.project.system.domain.SysHouseDecoration;
import com.ruoyi.project.system.service.ISysHouseDecorationService;

/**
 * 整屋装修Service业务层处理
 * 
 * @author jjp
 * @date 2020-04-26
 */
@Service
public class SysHouseDecorationServiceImpl implements ISysHouseDecorationService 
{
    @Autowired
    private SysHouseDecorationMapper sysHouseDecorationMapper;

    /**
     * 查询整屋装修
     * 
     * @param decorationId 整屋装修ID
     * @return 整屋装修
     */
    @Override
    public SysHouseDecoration selectSysHouseDecorationById(Long decorationId)
    {
        return sysHouseDecorationMapper.selectSysHouseDecorationById(decorationId);
    }

    /**
     * 查询整屋装修列表
     * 
     * @param sysHouseDecoration 整屋装修
     * @return 整屋装修
     */
    @Override
    public List<SysHouseDecoration> selectSysHouseDecorationList(SysHouseDecoration sysHouseDecoration)
    {
        return sysHouseDecorationMapper.selectSysHouseDecorationList(sysHouseDecoration);
    }

    /**
     * 新增整屋装修
     * 
     * @param sysHouseDecoration 整屋装修
     * @return 结果
     */
    @Override
    public int insertSysHouseDecoration(SysHouseDecoration sysHouseDecoration)
    {
        sysHouseDecoration.setCreateTime(DateUtils.getNowDate());
        return sysHouseDecorationMapper.insertSysHouseDecoration(sysHouseDecoration);
    }

    /**
     * 修改整屋装修
     * 
     * @param sysHouseDecoration 整屋装修
     * @return 结果
     */
    @Override
    public int updateSysHouseDecoration(SysHouseDecoration sysHouseDecoration)
    {
        return sysHouseDecorationMapper.updateSysHouseDecoration(sysHouseDecoration);
    }

    /**
     * 批量删除整屋装修
     * 
     * @param decorationIds 需要删除的整屋装修ID
     * @return 结果
     */
    @Override
    public int deleteSysHouseDecorationByIds(Long[] decorationIds)
    {
        return sysHouseDecorationMapper.deleteSysHouseDecorationByIds(decorationIds);
    }

    /**
     * 删除整屋装修信息
     * 
     * @param decorationId 整屋装修ID
     * @return 结果
     */
    @Override
    public int deleteSysHouseDecorationById(Long decorationId)
    {
        return sysHouseDecorationMapper.deleteSysHouseDecorationById(decorationId);
    }
}
